using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace Tracker.Data.DataTransfer
{
	/// <summary>
	/// Object data transfer definition for the 'Task' table
	/// </summary>
	[Serializable]
	[DataContract]
	public partial class Task : Tracker.Data.EFDAL.Interfaces.Entity.ITask, Tracker.Data.EFDAL.Interfaces.IDTO
	{
		#region Constructors

		/// <summary>
		/// The default contructor for the Task DTO
		/// </summary>
		public Task()
		{
		}

		#endregion

		#region Object Properties

		/// <summary>
		/// The Description field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("Description")]
		public virtual string Description { get; set; }

		/// <summary>
		/// The ID field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("ID")]
		[System.ComponentModel.DataAnnotations.Key()]
		[System.ComponentModel.ReadOnly(true)]
		public virtual int ID { get; set; }

		/// <summary>
		/// The Note field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("Note")]
		public virtual string Note { get; set; }

		/// <summary>
		/// The StatusId field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("StatusId")]
		public virtual int StatusId { get; set; }

		/// <summary>
		/// The CreatedDate field
		/// </summary>
		[DataMember]
		public virtual DateTime? CreatedDate { get; set; }

		/// <summary>
		/// The CreatedBy field
		/// </summary>
		[DataMember]
		public virtual string CreatedBy { get; set; }

		/// <summary>
		/// The ModifiedDate field
		/// </summary>
		[DataMember]
		public virtual DateTime? ModifiedDate { get; set; }

		/// <summary>
		/// The ModifiedBy field
		/// </summary>
		[DataMember]
		public virtual string ModifiedBy { get; set; }


		#endregion

		#region Navigation Properties

		/// <summary>
		/// The relation Task -> Log (Role: Task_log)
		/// </summary>
		[DataMember]
		public virtual ICollection<Tracker.Data.EFDAL.Interfaces.Entity.ILog> Task_logLogList { get; set; }

		/// <summary>
		/// The relation StatusDomain -> Task (Role: Status_task)
		/// </summary>
		[DataMember]
		public virtual Tracker.Data.EFDAL.Interfaces.Entity.IStatusDomain Status_taskStatusDomain { get; set; }

		#region Clone

		/// <summary>
		/// Creates a shallow copy of this object of all simple properties
		/// </summary>
		/// <returns></returns>
		public virtual object Clone()
		{
			var newItem = new Task();
			newItem.Description = this.Description;
			newItem.ID = this.ID;
			newItem.Note = this.Note;
			newItem.StatusId = this.StatusId;
			return newItem;
		}

		/// <summary>
		/// Creates a shallow copy of this object of all simple properties
		/// </summary>
		public static Task Clone(Tracker.Data.EFDAL.Interfaces.Entity.ITask item)
		{
			var newItem = new Task();
			newItem.Description = item.Description;
			newItem.ID = item.ID;
			newItem.Note = item.Note;
			newItem.StatusId = item.StatusId;
			return newItem;
		}

		#endregion

		#endregion

	}

}
